library Property

    module Property
        //力量
        integer m_strength
        //敏捷
        integer m_agility
        //智力
        integer m_intelligence
        //攻击
        real m_attack
        //护甲
        real m_armor
        //魔抗
        real m_magicResist
        //生命
        real m_HP
        //魔法
        real m_MP
        //生命恢复率
        real m_regenHP
        //魔法恢复率
        real m_regenMP
        //攻击速度
        real m_attackSpeed
        //移动速度
        real m_moveSpeed
        //暴击值
        real m_critValue
        //暴击率
        real m_critChance
        //命中率
        real m_hitChance
        //闪避率
        real m_dodgeChance

        private method resetProperty takes nothing returns nothing
            set m_strength = 0
            set m_agility = 0
            set m_intelligence = 0
            set m_attack = 0.00
            set m_armor = 0.00
            set m_magicResist = 0.00
            set m_HP = 0.00
            set m_MP = 0.00
            set m_regenHP = 0.00
            set m_regenMP = 0.00
            set m_attackSpeed = 0.00
            set m_moveSpeed = 0.00
            set m_critValue = 1.00
            set m_critChance = 0.00
            set m_hitChance = 1.00
            set m_dodgeChance = 0.00
        endmethod

        method plusProperty takes thistype target returns nothing
            set this.m_strength = this.m_strength + target.m_strength
            set this.m_agility = this.m_agility + target.m_agility
            set this.m_intelligence = this.m_intelligence + target.m_intelligence
            set this.m_attack = this.m_attack + target.m_attack
            set this.m_armor = this.m_armor + target.m_armor
            set this.m_magicResist = this.m_magicResist + target.m_magicResist
            set this.m_HP = this.m_HP + target.m_HP
            set this.m_MP = this.m_MP + target.m_MP
            set this.m_regenHP = this.m_regenHP + target.m_regenHP
            set this.m_regenMP = this.m_regenMP + target.m_regenMP
            set this.m_attackSpeed = this.m_attackSpeed + target.m_attackSpeed
            set this.m_moveSpeed = this.m_moveSpeed + target.m_moveSpeed
            set this.m_critValue = this.m_critValue + target.m_critValue
            set this.m_critChance = this.m_critChance + target.m_critChance
            set this.m_hitChance = this.m_hitChance + target.m_hitChance
            set this.m_dodgeChance = this.m_dodgeChance + target.m_dodgeChance
        endmethod

        method minusProperty takes thistype target returns nothing
            set this.m_strength = this.m_strength - target.m_strength
            set this.m_agility = this.m_agility - target.m_agility
            set this.m_intelligence = this.m_intelligence - target.m_intelligence
            set this.m_attack = this.m_attack - target.m_attack
            set this.m_armor = this.m_armor - target.m_armor
            set this.m_magicResist = this.m_magicResist - target.m_magicResist
            set this.m_HP = this.m_HP - target.m_HP
            set this.m_MP = this.m_MP - target.m_MP
            set this.m_regenHP = this.m_regenHP - target.m_regenHP
            set this.m_regenMP = this.m_regenMP - target.m_regenMP
            set this.m_attackSpeed = this.m_attackSpeed - target.m_attackSpeed
            set this.m_moveSpeed = this.m_moveSpeed - target.m_moveSpeed
            set this.m_critValue = this.m_critValue - target.m_critValue
            set this.m_critChance = this.m_critChance - target.m_critChance
            set this.m_hitChance = this.m_hitChance - target.m_hitChance
            set this.m_dodgeChance = this.m_dodgeChance - target.m_dodgeChance
        endmethod
    endmodule

endlibrary